using System; using System.Collections.Generic; using System.Linq; using System.Text; using ArtificialIntelligence; using Roslyn.Compilers; using Roslyn.Compilers.CSharp; namespace SymbolicComputation.AI { public class Distinction { public Comparer comparer = new Comparer(); public List<Job> DistinctWorkFunction(List<Job> inJobs) { return inJobs.Distinct(comparer).ToList(); } public class Comparer : System.Collections.Generic.IEqualityComparer<Job> { public bool Equals(Job jobState1, Job jobState2) { if (jobState1.jobState.ToString() == jobState2.jobState.ToString()) { return true; } else { return false; } } public int GetHashCode(Job inJob) { return inJob.jobState.ToString().GetHashCode(); } } } }